<?php
error_reporting(0);
session_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es" lang="es" dir="ltr">
  <head>
<title>PowerLaptops</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="default.css" />
<link rel="stylesheet" type="text/css" href="ddlevelsfiles/ddlevelsmenu-base.css" />
<link rel="stylesheet" type="text/css" href="ddlevelsfiles/ddlevelsmenu-topbar.css" />
<link rel="stylesheet" type="text/css" href="ddlevelsfiles/ddlevelsmenu-sidebar.css" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="ddlevelsfiles/ddlevelsmenu.js">

/***********************************************
* All Levels Navigational Menu- (c) Dynamic Drive DHTML code library (http://www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

</script>
  </head>
  <body>
    <noscript><p>Tu navegador no tiene activado javascript.</p></noscript>
    <div id="wrapper">
      <div id="header">
    		<div id = "publicidadLado">
          <img  src="images/static/contactenos_def.jpg" align="left"></img>
        </div>
        <img  src="images/static/envios_nacionales2.png" align="right"></img>
        <img src="images/static/pagos_seguros.png" align="right"></img>
          <br>
          <br>
      </div>
      <div id="menu">
    	  <div id = "logo"><img src="images/logo2.jpg" align="left" width = 225 height = 50></img></div>
    	  <div id = "barra">
                      <?php
              if($_SESSION["autenticado"]!=1){
            ?>
            <script language="JavaScript" type="text/javascript">
              function comprueba2(){
                document.iniciar.submit();
              }
            </script>
               <div id="signin-c">
                 <div type="button" id="boton_login">
              <a tabindex="3" class="signin" > <!-- href="/login" > -->
                <span>
                  Iniciar sesión
                </span>
              </a>
<div id="signin_menu" class="signin_menu">
  <form name="iniciar" action="getUser.php" method="POST" enctype="multipart/form-data">
  	    login:
      <input type="text" name="login" value="" size="10"/>
  	    Password:
      <input type="password" name="pass" value="" size="10"/>
      <input type="button" value="acceder" name="registro" onClick="javascript:comprueba2();">
    </form>
    <script language="JavaScript" type="text/javascript">
      function comprueba2(){
      document.iniciar.submit();
      }
    </script>
</div>
          <table><td><a href="index.php" >Inicio</a></td><td> <a href="catalogo.php">Cat&aacute;logo</a></td>
            <?php if($_SESSION["tipo"]==1){?>
              <td> <a href="editarSimple.php">Edici&oacute;n de Productos </a></td>
              <td><a href="admin.php">Administraci&oacute;n</a></td>
            <? }?>
          </table>
<!--      <img src="images/barra.jpg" align="left" width = 645 width = 15> -->
           <div class="login">

<!--
      <div id="signin_menu" style="-moz-border-radius: 5px 0 5px 5px;
  -moz-box-shadow: 0 3px 3px rgba(0, 0, 0, 0.3);
  background: none repeat scroll 0 0 #FFFFFF;
  border: 5px solid #CCCCCC;
  line-height: 16px;
  margin: 0;
  padding: 8px;
  position: absolute;
  right: 0;
  text-align: left;
  top: 100%;
  width: 240px;
  height: auto;
  z-index: 100;
">
      <div id="signin_menu" class="signin_menu">
        <form action="https://twitter.com/sessions" id="signin" method="post">
        <label for="username">Nombre de usuario o Correo Electrónico</label>
        <input type="text" tabindex="4" title="username" value="" name="session[username_or_email]" id="username">
      </p>

      <p class="textbox">
        <label for="password">Seguridad</label>
        <input type="password" tabindex="5" title="password" value="" name="session[password]" id="password">
      </p>

      <p class="remember">
        <input type="submit" tabindex="7" value="Iniciar sesión" id="signin_submit">
        <input type="checkbox" tabindex="6" value="1" name="remember_me" id="remember">
        <label for="remember">Recordar mis datos</label>
      </p>

      <p class="forgot">
        <a id="resend_password_link" href="/account/resend_password">¿Olvidaste tu contraseña?</a>
      </p>

      <p class="forgot-username">
        <a title="" id="forgot_username_link" href="/account/resend_password">¿Olvidaste tu nombre de usuario?</a>
      </p>
        <p class="complete">
          <a id="account_complete_link" href="/account/complete">¿Ya utilizas Twitter desde tu teléfono móvil?</a>
        </p>
      <input type="hidden" value="" id="signin_q" name="q">
      </form>
      </div>
-->
                  <script language="JavaScript" type="text/javascript">
                    $("#signin_menu").hide();
                    $("#boton_login").click(function() {
                    $("#signin_menu").slideToggle("fast");
                    });
                  </script>
      <!--
                    $("#signin_menu").hide();
                    $("#boton_login").click(function() {
                      if (("#singin_menu").is(":hidden")){
                        $("#singin_menu").slideDown("fast");
                      } else {
                        $("#singin_menu").slideOut("fast");
                      }
                    });

                  <div id="form_login">
                    <form name="iniciar" action="getUser.php" method="POST" enctype="multipart/form-data">
                      login:
                      <input type="text" name="login" value="" size="10"/>
                      Password:
                      <input type="password" name="pass" value="" size="10"/>
                      <input type="button" value="acceder" name="registro" onClick="javascript:comprueba2();"/>
                    </form>
                 </div>
                  <script language="JavaScript" type="text/javascript">
                    $("#form_login").hide();
                    $("#boton_login").click(function() {
                    $("#form_login").toggle()
                    });
                  </script>
      -->
                  <h5><a href="registroUsuario.php">¡Registrate!</a></h5>

                  <?php
                    } else{
                        echo "<h5>".$_SESSION["nombreusr"]." <a href=\"logout.php\">salir</a></h5>";
                    }
                  ?>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </body>
